//
//  NSString+Amount.h
//  CheFu365
//
//  Created by safiri on 2018/4/25.
//  Copyright © 2018年 safiri. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (Amount)

/** 字符串转金额 精确到分
 NSLog(@"%@", [NSString amount:@""]);       0.00
 NSLog(@"%@", [NSString amount:@"0"]);      0.00
 NSLog(@"%@", [NSString amount:@"0.2"]);    0.20
 NSLog(@"%@", [NSString amount:@"0.23"]);   0.23
 NSLog(@"%@", [NSString amount:@"5"]);      5.00
 NSLog(@"%@", [NSString amount:@"50"]);     50.00
 NSLog(@"%@", [NSString amount:@"50.1"]);   50.10
 NSLog(@"%@", [NSString amount:@"100.23"]); 100.23
 
 NSLog(@"%@", [NSString amount:nil]);       0.00
 NSLog(@"%@", [NSString amount:@"02.2"]);   2.20
 NSLog(@"%@", [NSString amount:@"04.23333"]);4.23
 NSLog(@"%@", [NSString amount:@"04.2366"]);4.24 需要注意
 */
+ (NSString *)amount:(NSString *)number;
+ (NSString *)amountDouble:(double)number;
@end
